package cn.itbox.example.application.test.four.annotationTest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class MyAppRunner implements CommandLineRunner {

    private final AnnotationExecutor annotationExecutor;

    @Autowired
    public MyAppRunner(AnnotationExecutor annotationExecutor) {
        this.annotationExecutor = annotationExecutor;
    }

    @Override
    public void run(String... args) {
        annotationExecutor.executeMyAnnotatedMethods();
    }
}